package com.xiaoxie.boot.bean;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.lang.Nullable;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Administrator
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class User implements Serializable{
    private static final long serialVersionUID = 1L;

    private Integer id;

    private String username;

    private String password;

    private Integer userType;

    private String realName;

    private String sex;

    //接收页面输入的时间，将其格式化
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    //后端传的日期格式化
    @JSONField(format = "yyyy-MM-dd")
    private Date birthday;

    private String address;

    private String tel;

    private String email;

    //接收页面输入的时间，将其格式化
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //后端传的日期格式化
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String libraryCard;

    private Integer userStatus;
}